<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../plugins/layui/css/myPage.css">
</head>
<body style=" overflow-x:hidden;" >
<div class="layui-container">

    <form class="layui-row layui-form">

            <fieldset class="layui-elem-field" style="margin-top: 20px;">
                <legend>客户详细信息</legend>


                <div class="layui-form-item">
                    <div class="layui-inline">
                    <label class="layui-form-label" style="width: 80px;"><span style="color: red;">*</span>客户简称</label>
                    <div class="layui-input-inline" style="width: 130px;">
                        <input   type="text" name="khjc"  required lay-verify="required" placeholder="请输入"  class="layui-input"  >
                    </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 70px">客户助记码</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input type="text" name="khzjm" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                    <label class="layui-form-label" style="width: 85px;">类别</label>
                    <div class="layui-input-inline" style="width: 150px;">
                        <select name="leibie" >
                            <option value=""></option>
                            <option value="大客户">大客户</option>
                            <option value="零散客户">零散客户</option>
                        </select>
                    </div>
                    </div>
                    <div class="layui-inline">
                    <label class="layui-form-label" style="width: 77px;"></span>客户分类</label>
                    <div class="layui-input-inline" style="width: 150px;">
                        <select name="khfl" >
                            <option value=""></option>
                            <option value="托运方">托运方</option>
                            <option value="收货方">收货方</option>

                        </select>
                    </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width: 80px;" >客户全称</label>
                    <div class="layui-input-inline" style="width: 412px;">
                        <input type="text" name="khqc"   lay-verify="" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">


                        <label class="layui-form-label" style="width: 80px;">客户联系人</label>
                        <div class="layui-input-inline" style="width: 132px;">
                            <input type="text" name="khlxr" autocomplete="off" class="layui-input">
                        </div>


                        <label class="layui-form-label" style="width: 100px;" >客户手机号码</label>
                        <div class="layui-input-inline"  style="width: 132px;" >
                            <input type="text" lay-verify="" name="khsjhm" autocomplete="off" class="layui-input">
                        </div>


                        <label class="layui-form-label" style="width: 100px;">客户传真号码</label>
                        <div class="layui-input-inline" style="width: 150px;">
                            <input type="text" name="khczhm" autocomplete="off" class="layui-input">
                        </div>

                    <label class="layui-form-label"  style="width: 90px;" >客户联系电话</label>
                    <div class="layui-input-inline" style="width: 150px;">
                        <input type="text" lay-verify="" name="khlxdh" autocomplete="off" class="layui-input">
                    </div>

                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width: 80px;" > 联系地址</label>
                    <div class="layui-input-inline" style="width: 412px;">
                        <input type="text" name="lxdz"   lay-verify="" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>

                    <label class="layui-form-label" style="width: 92px;" >税号</label>
                    <div class="layui-input-inline" style="width: 440px;">
                        <input type="text" name="shuihao"   lay-verify="" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width: 80px;">开户银行</label>
                    <div class="layui-input-inline" style="width: 412px;">
                        <input type="text" name="khyh"   lay-verify="" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>

                    <label class="layui-form-label" style="width: 92px;">银行账号</label>
                    <div class="layui-input-inline" style="width: 440px;">
                        <input type="text" name="yhzh"   lay-verify="" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"  style="width: 80px;">备注</label>
                    <div class="layui-input-inline" style="width: 412px;">
                        <input type="text" name="beizhu"   lay-verify="" placeholder="请输入" autocomplete="off" class="layui-input">
                        <input   name="sfcz"   type="hidden">

                    </div>
                </div>
            <div class="layui-form-item">

                <div class="layui-input-block" style="width: 440px;">
                    <input type="hidden" name="wjsc"   lay-verify="" id="khzlName" autocomplete="off" class="layui-input">
                </div>
            </div>

            </fieldset>

        <button class="layui-btn layui-btn-normal"  lay-submit  lay-filter="new" style="width: 10%; position: absolute;left: 35%"  >立即提交</button>
        <button type="reset" class="layui-btn layui-btn-normal" style="width: 10%; position: absolute;left: 55%" >重置</button>
    </form>

</div>
<script src="../plugins/layui/layui.js"></script>
<script src="../js/config.js"></script>
<script src="../js/tools.js"></script>
<script src="../js/jquery.md5.js"></script>
<script>
    layui.use(['table','form','layer','upload'],function () {
        var table = layui.table;
        var form = layui.form;
        var $ = layui.$;
        var layer = layui.layer;







        $('#khzl').click(function () {
            layer.open({
                type: 2,
                title: '上传客户文件',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area : ['700px' , '900px'],
                content: './uploadCusFiles.html',
                end:function(){

                }
            });
        });



        $("#close").on('click',function(){
            console.log("close");
            //当你在iframe页面关闭自身时
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
        });



        //监听工具条

        form.on('submit(new)', function(data){
            $("input").css("border","");

            $.ajax({
                url: contextPath+"/cstmr",
                type: "POST",
                contentType:"application/json;charset=utf-8",
                data: JSON.stringify(data.field) ,
                dataType:"json",
                success: function(res) {

                    newSuccess($,layer,res);


                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });

</script>
</body>
</html>